#include <vector>
#include <iostream>

using namespace std;

class A
{
	int *data;
	public:
	A(): data(new int[100])
	{
		cout << "constructing A, data is " << data << endl;
	}
	A(A &&x):
		data(x.data)
	{
		cout << "moving A, data is " << data << endl;
		x.data = nullptr;
	}
	~A()
	{
		if (data)
			delete [] data;
	}
	void set(int i, int x)
	{
		data[i] = x;
	}
	void print(int i)
	{
		cout << data[i] << endl;
	}
};

int main()
{
	vector<A> va;
	va.emplace_back();
	va.emplace_back();
	va.emplace_back();
	va.emplace_back();
	va.emplace_back();
	va.emplace_back();
}
